package cn.edu.xmist.proxy.staticproxy;

import cn.edu.xmist.proxy.Hello;
import cn.edu.xmist.proxy.Hello2;

public class Hello2Proxy implements Hello2 {
    private Hello2 hello2;

    public Hello2Proxy(Hello2 hello2) {
        this.hello2 = hello2;
    }

    @Override
    public void doSomething() {
        before();
        hello2.doSomething();
        after();
    }

    private void before() {
        System.out.println("我在前面");
    }

    private void after() {
        System.out.println("我在后面");
    }
}
